﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web.View.t201Menu.Default" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>t201</title>
    <script src="/View/js/Alert.js" type="text/javascript"></script> 
    <script type="text/javascript">
        function SetWinData(index) {
            document.getElementById("Hid").value = t201_MainStore.getAt(index).get('t201_00');
            
			Txtt201_01.setValue(t201_MainStore.getAt(index).get('t201_01'));
			Txtt201_02.setValue(t201_MainStore.getAt(index).get('t201_02'));
			Txtt201_03.setValue(t201_MainStore.getAt(index).get('t201_03'));
			Txtt201_04.setValue(t201_MainStore.getAt(index).get('t201_04'));
			Txtt201_05.setValue(t201_MainStore.getAt(index).get('t201_05'));
			Txtt201_06.setValue(t201_MainStore.getAt(index).get('t201_06'));
			Txtt201_07.setValue(t201_MainStore.getAt(index).get('t201_07'));
			Txtt201_08.setValue(t201_MainStore.getAt(index).get('t201_08'));
			Txtt201_09.setValue(t201_MainStore.getAt(index).get('t201_09'));
			Txtt201_10.setValue(t201_MainStore.getAt(index).get('t201_10'));
			Txtt201_11.setValue(t201_MainStore.getAt(index).get('t201_11'));
			Txtt201_12.setValue(t201_MainStore.getAt(index).get('t201_12'));
			Txtt201_13.setValue(t201_MainStore.getAt(index).get('t201_13'));
			Txtt201_14.setValue(t201_MainStore.getAt(index).get('t201_14'));
			Txtt201_15.setValue(t201_MainStore.getAt(index).get('t201_15'));
			Txtt201_16.setValue(t201_MainStore.getAt(index).get('t201_16'));
			Txtt201_71.setValue(t201_MainStore.getAt(index).get('t201_71'));
			Txtt201_72.setValue(t201_MainStore.getAt(index).get('t201_72'));
			Txtt201_73.setValue(t201_MainStore.getAt(index).get('t201_73'));
			Txtt201_74.setValue(t201_MainStore.getAt(index).get('t201_74'));
			Txtt201_75.setValue(t201_MainStore.getAt(index).get('t201_75'));
			Txtt201_76.setValue(t201_MainStore.getAt(index).get('t201_76'));
			Txtt201_77.setValue(t201_MainStore.getAt(index).get('t201_77'));
			Txtt201_78.setValue(t201_MainStore.getAt(index).get('t201_78'));
			Txtt201_79.setValue(t201_MainStore.getAt(index).get('t201_79'));
			Txtt201_80.setValue(t201_MainStore.getAt(index).get('t201_80'));
			Txtt201_81.setValue(t201_MainStore.getAt(index).get('t201_81'));
			Txtt201_82.setValue(t201_MainStore.getAt(index).get('t201_82'));
			Txtt201_83.setValue(t201_MainStore.getAt(index).get('t201_83'));
			Txtt201_84.setValue(t201_MainStore.getAt(index).get('t201_84'));
			Txtt201_85.setValue(t201_MainStore.getAt(index).get('t201_85'));
			Txtt201_86.setValue(t201_MainStore.getAt(index).get('t201_86'));
			Txtt201_17.setValue(t201_MainStore.getAt(index).get('t201_17'));
			Txtt201_70.setValue(t201_MainStore.getAt(index).get('t201_70'));
			Txtt201_18.setValue(t201_MainStore.getAt(index).get('t201_18'));
			Txtt201_19.setValue(t201_MainStore.getAt(index).get('t201_19'));
			Txtt201_20.setValue(t201_MainStore.getAt(index).get('t201_20'));
			Txtcollection_time.setValue(t201_MainStore.getAt(index).get('collection_time'));

            t201_Win.show();
        }
    </script>
</head>
<body>
    <form id="MainForm" runat="server">
    <ext:ResourceManager ID="MainResourceMgr" runat="server" />
    <!--用来导出到Excel的数据源-->
    <ext:Hidden ID="ExcelGridData" runat="server" />
    <!--t201表页面主数据元，自动生成-->
    <ext:Store runat="server" ID="t201_MainStore" OnRefreshData="t201_DataBind" AutoLoad="true">
        <Proxy>
            <ext:PageProxy />
        </Proxy>
        <Reader>
            <ext:JsonReader IDProperty="t201_00">
                <Fields>
                    
					<ext:RecordField Name="t201_00" />
					<ext:RecordField Name="t201_01" />
					<ext:RecordField Name="t201_02" />
					<ext:RecordField Name="t201_03" />
					<ext:RecordField Name="t201_04" />
					<ext:RecordField Name="t201_05" />
					<ext:RecordField Name="t201_06" />
					<ext:RecordField Name="t201_07" />
					<ext:RecordField Name="t201_08" />
					<ext:RecordField Name="t201_09" />
					<ext:RecordField Name="t201_10" />
					<ext:RecordField Name="t201_11" />
					<ext:RecordField Name="t201_12" />
					<ext:RecordField Name="t201_13" />
					<ext:RecordField Name="t201_14" />
					<ext:RecordField Name="t201_15" />
					<ext:RecordField Name="t201_16" />
					<ext:RecordField Name="t201_71" />
					<ext:RecordField Name="t201_72" />
					<ext:RecordField Name="t201_73" />
					<ext:RecordField Name="t201_74" />
					<ext:RecordField Name="t201_75" />
					<ext:RecordField Name="t201_76" />
					<ext:RecordField Name="t201_77" />
					<ext:RecordField Name="t201_78" />
					<ext:RecordField Name="t201_79" />
					<ext:RecordField Name="t201_80" />
					<ext:RecordField Name="t201_81" />
					<ext:RecordField Name="t201_82" />
					<ext:RecordField Name="t201_83" />
					<ext:RecordField Name="t201_84" />
					<ext:RecordField Name="t201_85" />
					<ext:RecordField Name="t201_86" />
					<ext:RecordField Name="t201_17" />
					<ext:RecordField Name="t201_70" />
					<ext:RecordField Name="t201_18" />
					<ext:RecordField Name="t201_19" />
					<ext:RecordField Name="t201_20" />
					<ext:RecordField Name="collection_time" />

                </Fields>
            </ext:JsonReader>
        </Reader> 
        <BaseParams>
            <ext:Parameter Name="start" Value="0" Mode="Raw">
            </ext:Parameter>
            <ext:Parameter Name="limit" Value="15" Mode="Raw">
            </ext:Parameter>
        </BaseParams>
    </ext:Store>
    <!--t201页面主表格-->
    <ext:Viewport ID="MainViewPort" runat="server">
        <Items>
            <ext:FitLayout>
                <Items>
                    <ext:GridPanel ID="t201_Grid" Layout="fit" TrackMouseOver="true" runat="server" StoreID="t201_MainStore"
                        StripeRows="true" Header="false" Border="false" Collapsible="true">
                        <TopBar>
                            <ext:Toolbar ID="MainToolBar" runat="server">
                                <Items>
                                    <ext:Button ID="BtnAdd" runat="server" Text="添加" Icon="Add">
                                        <Listeners>
                                            <Click Handler="#{t201_MainForm}.getForm().reset();#{Hid}.setValue('');#{t201_Win}.show();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:Button ID="BtnDel" runat="server" Text="删除" Icon="Delete">
                                        <DirectEvents>
                                            <Click OnEvent="BtnDel_Click">
                                                <Confirmation ConfirmRequest="true" Title="确认" Message="确实要删除吗?" />
                                                <EventMask ShowMask="true" Msg="正在删除数据，请等候 ..." />
                                            </Click>
                                        </DirectEvents>
                                        <Listeners>
                                            <Click Handler="if(#{t201_Grid}.getSelectionModel().getCount()<=0) {TellAlert('请选择要删除的记录');return false;}" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:ToolbarSeparator />
                                    <ext:Button ID="BtnReload" runat="server" Text="重新加载" Icon="Reload">
                                        <Listeners>
                                            <Click Handler="#{t201_MainStore}.reload();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:ToolbarFill />
                                    <ext:Button ID="BtnToExcel" runat="server" Text="To Excel" AutoPostBack="true" OnClick="BtnSaveToExcel"
                                        Icon="PageExcel">
                                        <Listeners>
                                            <Click Handler="#{ExcelGridData}.setValue(Ext.encode(t201_Grid.getRowsValues(false)));" />
                                        </Listeners>
                                        <ToolTips>
                                            <ext:ToolTip Title="将当前页内容存储为Excel文件">
                                            </ext:ToolTip>
                                        </ToolTips>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <ColumnModel ID="t201_ColumnMode" runat="server">
                            <Columns>
                                <ext:RowNumbererColumn Width="20" />
                                <ext:Column Header="主键" Sortable="true" Hidden="true" DataIndex="t201_00" />
                                
								<ext:Column Header="T201_01" Sortable="true" DataIndex="t201_01" />
								<ext:Column Header="T201_02" Sortable="true" DataIndex="t201_02" />
								<ext:Column Header="T201_03" Sortable="true" DataIndex="t201_03" />
								<ext:Column Header="T201_04" Sortable="true" DataIndex="t201_04" />
								<ext:Column Header="T201_05" Sortable="true" DataIndex="t201_05" />
								<ext:Column Header="T201_06" Sortable="true" DataIndex="t201_06" />
								<ext:Column Header="T201_07" Sortable="true" DataIndex="t201_07" />
								<ext:Column Header="T201_08" Sortable="true" DataIndex="t201_08" />
								<ext:Column Header="T201_09" Sortable="true" DataIndex="t201_09" />
								<ext:Column Header="T201_10" Sortable="true" DataIndex="t201_10" />
								<ext:Column Header="T201_11" Sortable="true" DataIndex="t201_11" />
								<ext:Column Header="T201_12" Sortable="true" DataIndex="t201_12" />
								<ext:Column Header="T201_13" Sortable="true" DataIndex="t201_13" />
								<ext:Column Header="T201_14" Sortable="true" DataIndex="t201_14" />
								<ext:Column Header="T201_15" Sortable="true" DataIndex="t201_15" />
								<ext:Column Header="T201_16" Sortable="true" DataIndex="t201_16" />
								<ext:Column Header="T201_71" Sortable="true" DataIndex="t201_71" />
								<ext:Column Header="T201_72" Sortable="true" DataIndex="t201_72" />
								<ext:Column Header="T201_73" Sortable="true" DataIndex="t201_73" />
								<ext:Column Header="T201_74" Sortable="true" DataIndex="t201_74" />
								<ext:Column Header="T201_75" Sortable="true" DataIndex="t201_75" />
								<ext:Column Header="T201_76" Sortable="true" DataIndex="t201_76" />
								<ext:Column Header="T201_77" Sortable="true" DataIndex="t201_77" />
								<ext:Column Header="T201_78" Sortable="true" DataIndex="t201_78" />
								<ext:Column Header="T201_79" Sortable="true" DataIndex="t201_79" />
								<ext:Column Header="T201_80" Sortable="true" DataIndex="t201_80" />
								<ext:Column Header="T201_81" Sortable="true" DataIndex="t201_81" />
								<ext:Column Header="T201_82" Sortable="true" DataIndex="t201_82" />
								<ext:Column Header="T201_83" Sortable="true" DataIndex="t201_83" />
								<ext:Column Header="T201_84" Sortable="true" DataIndex="t201_84" />
								<ext:Column Header="T201_85" Sortable="true" DataIndex="t201_85" />
								<ext:Column Header="T201_86" Sortable="true" DataIndex="t201_86" />
								<ext:Column Header="T201_17" Sortable="true" DataIndex="t201_17" />
								<ext:Column Header="T201_70" Sortable="true" DataIndex="t201_70" />
								<ext:Column Header="T201_18" Sortable="true" DataIndex="t201_18" />
								<ext:Column Header="T201_19" Sortable="true" DataIndex="t201_19" />
								<ext:Column Header="T201_20" Sortable="true" DataIndex="t201_20" />
								<ext:Column Header="COLLECTION_TIME" Sortable="true" DataIndex="collection_time" />

                            </Columns>
                        </ColumnModel>
                        <Listeners>
                            <RowDblClick Handler="SetWinData(rowIndex);" />
                        </Listeners>
                        <Plugins>
                            <ext:GridFilters runat="server" FiltersText="查找" ID="t201_Filter">
                                <Filters>
                                    
								<ext:StringFilter DataIndex="t201_01" />
								<ext:StringFilter DataIndex="t201_02" />
								<ext:StringFilter DataIndex="t201_03" />
								<ext:StringFilter DataIndex="t201_04" />
								<ext:StringFilter DataIndex="t201_05" />
								<ext:StringFilter DataIndex="t201_06" />
								<ext:StringFilter DataIndex="t201_07" />
								<ext:StringFilter DataIndex="t201_08" />
								<ext:StringFilter DataIndex="t201_09" />
								<ext:StringFilter DataIndex="t201_10" />
								<ext:StringFilter DataIndex="t201_11" />
								<ext:StringFilter DataIndex="t201_12" />
								<ext:StringFilter DataIndex="t201_13" />
								<ext:StringFilter DataIndex="t201_14" />
								<ext:StringFilter DataIndex="t201_15" />
								<ext:StringFilter DataIndex="t201_16" />
								<ext:StringFilter DataIndex="t201_71" />
								<ext:StringFilter DataIndex="t201_72" />
								<ext:StringFilter DataIndex="t201_73" />
								<ext:StringFilter DataIndex="t201_74" />
								<ext:StringFilter DataIndex="t201_75" />
								<ext:StringFilter DataIndex="t201_76" />
								<ext:StringFilter DataIndex="t201_77" />
								<ext:StringFilter DataIndex="t201_78" />
								<ext:StringFilter DataIndex="t201_79" />
								<ext:StringFilter DataIndex="t201_80" />
								<ext:StringFilter DataIndex="t201_81" />
								<ext:StringFilter DataIndex="t201_82" />
								<ext:StringFilter DataIndex="t201_83" />
								<ext:StringFilter DataIndex="t201_84" />
								<ext:StringFilter DataIndex="t201_85" />
								<ext:StringFilter DataIndex="t201_86" />
								<ext:StringFilter DataIndex="t201_17" />
								<ext:StringFilter DataIndex="t201_70" />
								<ext:StringFilter DataIndex="t201_18" />
								<ext:StringFilter DataIndex="t201_19" />
								<ext:StringFilter DataIndex="t201_20" />
								<ext:StringFilter DataIndex="collection_time" />

                                </Filters>
                            </ext:GridFilters>
                        </Plugins>
                        <LoadMask ShowMask="true" Msg="正在加载..." />
                        <SelectionModel>
                            <ext:CheckboxSelectionModel ID="CheckBoxGrid" runat="server" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolbar ID="PagingToolBar" StoreID="t201_MainStore" PageSize="15" runat="server" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:FitLayout>
        </Items>
    </ext:Viewport>
    
    <!--t201表修改，添加主窗体-->
    <ext:Window ID="t201_Win" Collapsible="true" Hidden="true" Modal="true"
        Maximizable="true" runat="server" Title="添加/修改记录" Icon="WorldEdit" Width="630" AutoHeight="true"
        Resizable="true">
        <Items>
            <ext:Hidden ID="Hid" runat="server">
            </ext:Hidden>
            <ext:FormPanel ID="t201_MainForm" LabelWidth="65" Frame="true" runat="server"
                Border="false" Height="600" Padding="5" Icon="UserAdd" Layout="Column">
                <Items>
                    <ext:Panel runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form">
                        <Items>
                            
							<ext:TextField ID="Txtt201_01" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_01" />
							<ext:TextField ID="Txtt201_03" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_03" />
							<ext:TextField ID="Txtt201_05" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_05" />
							<ext:TextField ID="Txtt201_07" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_07" />
							<ext:TextField ID="Txtt201_09" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_09" />
							<ext:TextField ID="Txtt201_11" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_11" />
							<ext:TextField ID="Txtt201_13" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_13" />
							<ext:TextField ID="Txtt201_15" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_15" />
							<ext:TextField ID="Txtt201_71" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_71" />
							<ext:TextField ID="Txtt201_73" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_73" />
							<ext:TextField ID="Txtt201_75" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_75" />
							<ext:TextField ID="Txtt201_77" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_77" />
							<ext:TextField ID="Txtt201_79" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_79" />
							<ext:TextField ID="Txtt201_81" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_81" />
							<ext:TextField ID="Txtt201_83" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_83" />
							<ext:TextField ID="Txtt201_85" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_85" />
							<ext:TextField ID="Txtt201_17" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_17" />
							<ext:TextField ID="Txtt201_18" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_18" />
							<ext:TextField ID="Txtt201_20" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_20" />

                        </Items>
                    </ext:Panel>
                    <ext:Panel runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form">
                        <Items> 
                            
							<ext:TextField ID="Txtt201_02" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_02" />
							<ext:TextField ID="Txtt201_04" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_04" />
							<ext:TextField ID="Txtt201_06" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_06" />
							<ext:TextField ID="Txtt201_08" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_08" />
							<ext:TextField ID="Txtt201_10" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_10" />
							<ext:TextField ID="Txtt201_12" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_12" />
							<ext:TextField ID="Txtt201_14" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_14" />
							<ext:TextField ID="Txtt201_16" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_16" />
							<ext:TextField ID="Txtt201_72" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_72" />
							<ext:TextField ID="Txtt201_74" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_74" />
							<ext:TextField ID="Txtt201_76" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_76" />
							<ext:TextField ID="Txtt201_78" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_78" />
							<ext:TextField ID="Txtt201_80" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_80" />
							<ext:TextField ID="Txtt201_82" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_82" />
							<ext:TextField ID="Txtt201_84" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_84" />
							<ext:TextField ID="Txtt201_86" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_86" />
							<ext:TextField ID="Txtt201_70" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_70" />
							<ext:TextField ID="Txtt201_19" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T201_19" />
							<ext:TextField ID="Txtcollection_time" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="COLLECTION_TIME" />

                        </Items>
                    </ext:Panel>
                </Items>
            </ext:FormPanel>
        </Items>
        <Buttons> 
            <ext:Button Text="提交" ID="BtnSave" runat="server" Icon="Disk">
                <DirectEvents>
                    <Click OnEvent="BtnSave_Click">
                        <EventMask ShowMask="true" Msg="正在提交，请等候 ..."  />
                    </Click>
                </DirectEvents>
                <Listeners>
                    <Click Handler="if (#{t201_MainForm}.getForm().isValid()) {;}else{Ext.Msg.show({icon: Ext.MessageBox.ERROR, msg: '您填写的信息不正确，请您确认！', buttons:Ext.Msg.OK});return false;}" />
                </Listeners>
            </ext:Button>
            <ext:Button Text="取消" ID="BtnConcel" Icon="Delete">
                <Listeners>
                    <Click Handler="#{t201_Win}.hide();" />
                </Listeners>
            </ext:Button>
        </Buttons>
    </ext:Window>
    </form>
</body>
</html>
